package Month09.day0924;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt();//接收数组行数
        int[][] arr = new int[m][m];
        for (int i = 0; i < m; i++) {
            for (int j = 0; j <= i; j++) {
                if(0 == j){
                    arr[i][j] = 1;
                }else{
                    arr[i][j] = arr[i - 1][j] + arr[i - 1][j - 1];
                }
            }
        }
        for (int i = 0; i < m; i++) {
            for (int j = 0; j <= i ; j++) {
                System.out.printf("%5d",arr[i][j]);
            }
            System.out.println();
        }
    }//再次复习杨辉三角
}
